/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2204 - Str6
 * <p>Powered by webrx On 2022-09-15 14:07:05
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Str6 {
    public static void main(String[] args) {

        String str = "/*\n" +
                " * Copyright (c) 2006, 2022, webrx.cn All rights reserved.\n" +
                " *\n" +
                " */\n" +
                "package cn.webrx;\n" +
                "\n" +
                "import java.util.regex.Matcher;\n" +
                "import java.util.regex.Pattern;\n" +
                "\n" +
                "/**\n" +
                " * <p>Project: jse2204 - Reg11\n" +
                " * <p>Powered by webrx On 2022-09-15 14:02:30\n" +
                " *\n" +
                " * @author webrx [webrx@126.com]\n" +
                " * @version 1.0\n" +
                " * @since 17\n" +
                " */\n" +
                "public class Reg11 {\n" +
                "    public static void main(String[] args) {\n" +
                "        String a = \"java8php123javascript6mysql88888html5\";\n" +
                "        System.out.println(a);\n" +
                "        System.out.println(a.replaceAll(\"\\\\d+?\", \"-\"));//?禁用贪婪\n" +
                "\n" +
                "        String str = \"\"\"\n" +
                "\t\t\t\t<div>hello</div><div>java 15</div><div><p>java 15</p><span>java 8</p><div>java 15</div></div>\n" +
                "\t\t\t\t\"\"\";\n" +
                "\n" +
                "        Pattern p = Pattern.compile(\"<div>[a-z0-9\\s]*?java[a-z0-9\\s]*?</div>\");\n" +
                "        Matcher m = p.matcher(str);\n" +
                "        while(m.find()) {\n" +
                "            System.out.println(m.group());\n" +
                "        }\n" +
                "    }\n" +
                "}\n";

        System.out.println(str);


        String blockstr = """
                /*
                 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
                 *
                 */
                package cn.webrx;
                                
                import java.util.regex.Matcher;
                import java.util.regex.Pattern;
                                
                /**
                 * <p>Project: jse2204 - Reg11
                 * <p>Powered by webrx On 2022-09-15 14:02:30
                 *
                 * @author webrx [webrx@126.com]
                 * @version 1.0
                 * @since 17
                 */
                public class Reg11 {
                    public static void main(String[] args) {
                        String a = "java8php123javascript6mysql88888html5";
                        System.out.println(a);
                        System.out.println(a.replaceAll("\\\\d+?", "-"));//?禁用贪婪
                                
                        String str = ""\"
                				<div>hello</div><div>java 15</div><div><p>java 15</p><span>java 8</p><div>java 15</div></div>
                				""\";
                                
                        Pattern p = Pattern.compile("<div>[a-z0-9\\s]*?java[a-z0-9\\s]*?</div>");
                        Matcher m = p.matcher(str);
                        while(m.find()) {
                            System.out.println(m.group());
                        }
                    }
                }
                                
                """;
        System.out.println(blockstr);

        String sok = """
hello
""";


    }
}
